/**
 * Created by Administrator on 2016/10/11.
 */

var localStorage = cc.sys.localStorage;

jGame.saveData = function (key, value) {
    localStorage.setItem(key, value);
}

jGame.getData = function (key, defaultValue) {
    var value = localStorage.getItem(key);
    if ((value === null || value == "") && defaultValue !== undefined) return defaultValue;
    return value;
}

jGame.cleanData = function (key) {
    localStorage.removeItem(key);
}